package com.cskaoyan.exception;

import com.cskaoyan.bean.common.BaseRespVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/*
 * @Auther:王贲
 * @Date:2022/9/9
 * @Description:
 * @VERSON:1.8
 */
@RestControllerAdvice
public class ExceptionControllerAdvice {

    @ExceptionHandler(ValidatorException.class)
    public BaseRespVo validator(ValidatorException exception) {
        //String message = exception.getMessage();
        String message = "";
        return BaseRespVo.invalidParam(message);
    }
}
